<template>
  <div>
    <cu-nav
      centerText="组件库"
      colorIcon="#fff"
      colorText="#fff"
      background="#e8443d"
      :border="true"
    ></cu-nav>
    <div @click="toPath(1)" class="title" style="margin-top:10px">导航栏</div>
    <div @click="toPath(2)" class="title">图片展示</div>
    <div @click="toPath(3)" class="title">底部tarbar</div>
  </div>
</template>

<script>
import CuNav from "@/components/custom-model/cu-nav";

export default {
  components: {
    "cu-nav": CuNav
  },
  methods: {
    toPath(index) {
      console.log(index);
      let path = "";
      if (index === 1) {
        path = "navHeader";
      } else if (index === 2) {
        path = "imgsShow";
      } else if (index === 3) {
        path = "cuTarbar";
      }
      this.$router.push({
        name: path
      });
    }
  }
};
</script>

<style lang="less" scoped>
.view-router {
  width: 100%;
  min-height: 100vh;
  background: #fff;
}
.title {
  width: 100%;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: #f8f8f8;
  margin-bottom: 10px;
}
</style>